<template>
  <div class="index-page">
    <pageHead title='提供帮助'></pageHead>
    <main>
      <ul>
        <li v-for="(item, index) in items" :key="index">
          <h5 v-text="item.title"></h5>
          <p v-text="item.text"></p>
          <div class="btn" v-text="item.btnText" @click="btn(index)"></div>
        </li>
      </ul>
    </main>
  </div>
</template>

<script>
import pageHead from '@/components/include/header'
export default {
  components: { pageHead },
  data () {
    return {
      items: [
        {
          title: '援助社区',
          text: '提供帮助金额1000~3000元，每轮收益率25%。排队时间1~7天，匹配成功前4个小时内奖励5%，打款成功后进入接受帮助列队，1~10天匹配收款。',
          btnText: '进入援助社区'
        }, {
          title: '创富社区',
          text: '提供帮助金额1万~3万元，前五轮收益率15%。第六轮开始收益为10%，排队时间为3~10天。前4小时奖励5%，打款成功后，进入接受帮助列队，3~15天匹配收款。',
          btnText: '进入创富社区'
        }
      ]
    }
  },
  activated: function () {},
  mounted: function () {},
  methods: {
    btn: function (e) {
      this.$router.push({
        path: 'provideHelp/community',
        query: {
          id: e
        }
      })
    }
  },
  destroyed: function () {}
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss" scoped>
.index-page {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  right: 0;
  background: #fff;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  main {
    position: absolute;
    top: 0.88rem;
    left: 0;
    right: 0;
    bottom: 0;
    ul {
      li {
        width: 6.9rem;
        background: #f3f3f3;
        margin-left: auto;
        margin-right: auto;
        padding-top: 0.4rem;
        margin-top: 0.6rem;
        padding-bottom: 0.67rem;
        border-radius: 0.4rem;
        h5 {
          font-weight: normal;
          font-size: 0.32rem;
          color: #313131;
          text-align: center;
        }
        p {
          font-size: 0.28rem;
          color: #313131;
          width: 6.25rem;
          margin-left: auto;
          margin-right: auto;
          margin-top: 0.35rem;
          line-height: 0.5rem;
        }
        .btn {
          font-size: 0.3rem;
          margin-top: 0.35rem;
          color: #ffffff;
          display: block;
          text-align: center;
          width: 6rem;
          height: 0.8rem;
          line-height: 0.8rem;
          background: #0192dd;
          border-radius: 0.5rem;
          margin-left: auto;
          margin-right: auto;
        }
      }
    }
  }
}
</style>
